﻿<src:WpfConfiguration x:Class="SensorMayhem.Wpf.LightConfig"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:src="clr-namespace:MayhemWpf.UserControls;assembly=MayhemWpf"
             Width="400">

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100" />
            <ColumnDefinition Width="200" />
            <ColumnDefinition Width="100" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Grid Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" HorizontalAlignment="Center">
            <StackPanel>
                <RadioButton x:Name="aboveRadioButton" GroupName="RadioGroup" Content="Goes Above"/>
                <RadioButton x:Name="belowRadioButton" GroupName="RadioGroup" Content="Drops Below"/>
            </StackPanel>
        </Grid>

        <TextBlock HorizontalAlignment="Left" Style="{StaticResource ConfigLabel}" Grid.Column="0" Grid.Row="1">Intensity:</TextBlock>
        <Slider ValueChanged="IntensitySlider_ValueChanged" x:Name="IntensitySlider" Minimum="0" Maximum="5" TickFrequency="0.00006" Grid.Column="1" Grid.Row="1"/>
        <TextBlock Text="0" x:Name="IntensityTextBlock" TextAlignment="Center" TextWrapping="Wrap" Grid.Column="2" Grid.Row="1"/>
        
        
        <TextBlock Text="" TextAlignment="Center" TextWrapping="Wrap" Name="lightConditionText" Grid.Column="1" Grid.Row="2"/>

        <TextBlock HorizontalAlignment="Left" Style="{StaticResource ConfigLabel}" Grid.Column="0" Grid.Row="3">Current intensity:</TextBlock>
        <TextBlock Text="Not available"  TextWrapping="Wrap" Name="currentIntensityText" Grid.Column="1" Grid.Row="3"/>

        <TextBlock Style="{StaticResource ConfigErrorMessage}" Grid.ColumnSpan="2" Visibility="Collapsed" TextWrapping="Wrap" Name="noSensorText" Grid.Column="1" Grid.Row="4">Your computer does not seem to have a ambient light sensor installed.</TextBlock>
    </Grid>
</src:WpfConfiguration>